﻿using System;
using System.Collections.Generic;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using TimKen.DataEntity;

namespace TimKen.Web.UserControls
{
    public partial class LanguagePic : TimKen.App.BaseUserControl
    {
        private string _languageName;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
                setPic();
        }

        public string languageName
        {
            set
            {
                this._languageName = value;
            }
            get
            {
                return _languageName;
            }
        }

        private void setPic()
        {
            this.imgLanguage.ImageUrl = "~/Images/" + _languageName + ".gif";
            string imgTip = GetLangString(_languageName);
            this.imgLanguage.ToolTip = imgTip;
            this.imgLanguage.AlternateText = imgTip;
        }
    }
}